package day_03;

import java.util.Arrays;
import java.util.Scanner;

public class WMFirstTest {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int target = Integer.parseInt(sc.nextLine());
        String s = sc.nextLine();
        String[] arr = s.split(" ");
        int[] nums = new int[arr.length];
        for (int i = 0; i < arr.length; i++) {
            nums[i] = Integer.parseInt(arr[i]);
        }

        int result = search(nums, target);

        System.out.println(result);
    }

    public static int search(int[] nums, int target) {
        if(nums.length == 0) return -1;
        if(nums.length == 1) {
            if(target == nums[0]) return 0;
            return -1;
        }

        //Arrays.sort(nums);
        boolean flag = false;
        for(int i: nums){
            if (i == target) {
                flag = true;
                break;
            }
        }

        if(!flag) return -1;

        for (int i = 0; i < nums.length; i++) {
            if(nums[i] == target) return i;
        }
        return -1;
    }
}
